@extends('layouts.master')



@section('siderbar')
    <p>Menu</p>
   <ul>
   <li>AA</li>
   <li>BB</li> 
   </ul>
@stop


@section('content')
 
      @if(Session::has('global'))
          <div class="alert alert-info">
        <p>{{Session::get('global')}}</p>
        </div>  
       @endif


   <h2>Users Mangement</h2>
   <br>
<hr>


<table class="table table-striped table-bordered table-condensed table-hover ">
<tr class="danger"><th>Id</th><th>username</th><th>email</th><th>active</th><th>view profile</th><th>Action</th><tr/>

@foreach ($users as $user)
<div class="modal" id="deleteBox">
  <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
          <h4 class="modal-title">Delete</h4>
        </div>
        <div class="modal-body">
          Are you sure you want to Delete?
        </div>
        <div class="modal-footer">
          <a href="#" data-dismiss="modal" class="btn">Cancel</a>
          <a href="/admin/userdelete/{{$user->id}}" id="btn_logout" class="btn btn-primary">Delete</a>
        </div>
      </div>
    </div>
</div>
    <tr>
        <td>{{$user->id}}</td>
        <td>{{$user->username}}</td>
        <td>{{$user->email}}</td>
        <td>{{$user->active}}</td>
        <td>{{$user->id}}</td>
        <td><a href="" data-toggle="modal" data-target="#deleteBox">delete</a> <a href="/admin/userblock/{{$user->id}}">block</a></td></tr>
@endforeach
</table>

@stop





